import Vue from 'vue';
import App from './App';
import router from './router';
import store from './store';
import Vant from 'vant';
import 'vant/lib/index.css';
// import './assets/styles/icon.css';
import './assets/styles/iconfont.css';
import './assets/styles/index.less';
import 'amfe-flexible';
import '@/utils/day';
import { getConfig } from './api/common';
Vue.config.productionTip = false;

Vue.use(Vant);

router.beforeEach(async (to, from, next) => {
    if (!window.baseUrl) {
        const config = await getConfig();
        window.baseUrl = config.devOpsDomain.host;
        window.basePort = config.devOpsDomain.port;
        window.extra = config.devOpsDomain.extra;
    }
    next();
});

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app');
